package com.yanyilu.jianjian.entity;

/**
 * @author java11
 * @date 2021/1/12 18:06
 */

import com.yanyilu.jianjian.util.TimeUtil;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.*;

@Proxy(lazy = false)
@DynamicUpdate
@DynamicInsert
@Data
@Entity
@org.hibernate.annotations.Table(appliesTo = "tb_message_user", comment = "消息")
@Table(name = "tb_message_user")
public class MessageUser {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer messageuserId;
    /**消息id*/
    @Column(columnDefinition="INTEGER(11) COMMENT '消息id'")
    private Integer messageId;
    /**用户id*/
    @Column(columnDefinition="INTEGER(11) COMMENT '用户id'")
    private Integer userId;
    /**状态*/
    @Column(columnDefinition="VARCHAR(45) COMMENT '状态'")
    private String state;
    @Column(nullable = false, columnDefinition = "int(10) comment '创建时间'")
    private Integer creatTime = TimeUtil.getTime();
}